package ${voPackage};

import com.odianyun.project.support.base.model.BaseVO;
<#list po.getImportList(po.editFields) as import>
import ${import};
</#list>
<#list po.relManyList as rel>
import java.util.List;
<#break>
</#list>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
<#list po.editFields as field>
<#if field.dataSourceType?? && field.dataSourceType == "code">
import com.odianyun.project.support.cache.DictUtils;
<#break>
</#if>
</#list>

/**
 * ${po.title}
 * @CreateDate ${date}
 */
 @ApiModel("${po.title}VO")
public class ${po.name}VO extends BaseVO {
    <#list po.editFields as field>
    <#if !field.common>
    /**
     * ${field.title}
     */
    @ApiModelProperty("${field.title}")
    private ${field.typeName} ${field.relName};
    </#if>
    </#list>
    <#list po.relOneList as rel>
    /**
       * ${rel.title}
       */
    @ApiModelProperty(value="${rel.title}")
    private ${rel.name}VO ${rel.uncapitalizedName};
    </#list>
    <#list po.relManyList as rel>
    /**
       * ${rel.title}
       */
    @ApiModelProperty(value="${rel.title}")
    private List<${rel.name}VO> ${rel.uncapitalizedName}List;
    </#list>

    <#list po.editFields as field>
    <#if !field.common>
    public void set${field.relName?cap_first}(${field.typeName} ${field.relName}) {
        this.${field.relName} = ${field.relName};
    }
    public ${field.typeName} get${field.relName?cap_first}() {
        return ${field.relName};
    }
    </#if>
    </#list>

    <#list po.relOneList as rel>
    public void set${rel.name}(${rel.name}VO ${rel.uncapName}) {
        this.${rel.uncapName} = ${rel.uncapName};
    }
    public ${rel.name}VO get${rel.name}() {
        return ${rel.uncapName};
    }
    </#list>
    <#list po.relManyList as rel>
    public void set${rel.name}List(List<${rel.name}VO> ${rel.uncapName}List) {
        this.${rel.uncapName}List = ${rel.uncapName}List;
    }
    public List<${rel.name}VO> get${rel.name}List() {
        return ${rel.uncapName}List;
    }
    </#list>

	  /*---------------------------------- extra info --------------------------------*/
	  <#list po.editFields as field>
    <#if !field.common>
    <#if field.dataSourceType?? && field.dataSourceType == "code">
    public String get${field.relName?cap_first}Str() {
        return DictUtils.getName("${field.dataSourceKey}", ${field.relName});
    }
    </#if>
    </#if>
	  </#list>
}